package com.wanhugou.payment;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication // Spring Boot 应用的标识
@MapperScan("com.wanhugou.payment.dao") // mapper 接口类扫描包配置
@EnableScheduling
@ServletComponentScan
public class PayApp {
	
    @Autowired  
    private RestTemplateBuilder builder;  
  
    @Bean  
    public RestTemplate restTemplate() {  
        return builder.build();  
    }  
  
    public static void main(String[] args) {
    	new SpringApplicationBuilder(PayApp.class).web(true).run(args);
    }
}
